package com.wydstation.power.properties.dto.device;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class DeviceInfoDTO {
    private Long deviceId;

    private DeviceInfo deviceInfo;
    private DeviceInfoBoxInvert deviceInfoBoxInvert;
    private List<DeviceInfoBranch> deviceInfoBranchList;
    private DeviceInfoFan deviceInfoFan;
    private DeviceInfoWindTower deviceInfoWindTower;
    private DeviceInfoMatrix deviceInfoMatrix;

    @Data
    public static class DeviceInfo {

        private static final long serialVersionUID = 1L;

        /**
         * 主键
         */
        private Long deviceId;

        /**
         * 电站编码
         */
        private Integer stationId;

        /**
         * 设备类型编码
         */
        private Integer deviceTypeId;

        /**
         * 设备型号编码
         */
        private Integer deviceModeId;

        /**
         * 上级设备id
         */
        private Integer parentDeviceId;

        /**
         * 设备名称
         */
        private String deviceName;

        /**
         * 实际容量
         */
        private BigDecimal deviceCapacity;

        /**
         * （0未投入使用，1已投入使用）
         */
        private Boolean isProduction;

        /**
         * 接入平台时间
         */
        private LocalDateTime connectTime;

        /**
         * 设备产生发电的时间
         */
        private LocalDateTime productionTime;

        /**
         * 0：否，1：是，默认为1
         */
        private Boolean isDisplay;
        private String deviceOrder;
        /**
         * 纬度
         */
        private BigDecimal latitude;
        /**
         * 经度
         */
        private BigDecimal longitude;
    }


    @Data
    public class DeviceInfoBoxInvert {
        private static final long serialVersionUID = 1L;
        /**
         * 主键
         */
        private Long deviceId;
        /**
         * 方阵
         */
        private Long matrixId;
    }

    @Data
    public static class DeviceInfoBranch implements Serializable {
        private static final long serialVersionUID = 1L;
        private Long deviceId;
        private Integer branch_num;//` int(10) NOT NULL DEFAULT '-1' COMMENT '濉旈珮',
        private Long branch_id;//` bigint(20) NOT NULL,
        private Long branch_mode_id;//` bigint(20) NOT NULL,
        private String branch_name;//` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
        private LocalDateTime update_time;//` datetime DEFAULT NULL,
        private short is_enable;//` tinyint(1) DEFAULT NULL,
    }

    @Data
    public static class DeviceInfoFan implements Serializable {
        private static final long serialVersionUID = 1L;
        private LocalDate assembly_time;//` date DEFAULT NULL COMMENT '閺傚綊妯€',
        private LocalDate warranty_endtime;//` date DEFAULT NULL COMMENT '鍑鸿川淇濇椂闂?',
        private LocalDate ongrid_ime;//` date DEFAULT NULL COMMENT '并网时间',
        private LocalDate scrap_time;//` date DEFAULT NULL COMMENT '报废时间',
        private BigDecimal height;//` decimal(11,5) DEFAULT NULL,

    }

    @Data
    public static class DeviceInfoWindTower implements Serializable {
        private static final long serialVersionUID = 1L;
        private Long deviceId;
        private BigDecimal tower_height;//` decimal(25,9) DEFAULT NULL COMMENT '濉旈珮',
        private LocalDateTime tower_assembly_time;//` timestamp NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
        private String wind_measurement_equipment;//` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '测风设备',
    }

    @Data
    public static class DeviceInfoMatrix implements Serializable {
        private static final long serialVersionUID = 1L;
        @Deprecated
        private transient Long deviceId;
        private Long stationId;//` bigint(10) NOT NULL,
        private LocalDateTime createTime;//` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
        private Long createUserId;//` bigint(11) NOT NULL DEFAULT '0',
        private String matrixName;//` varchar(10) NOT NULL,
    }


}
